import { createRouter, createWebHistory } from 'vue-router'
import My from '@/views/home/my.vue'
import Cart from '@/views/home/cart.vue'
import Asx from '@/views/home/asx.vue'
import Cla from '@/views/home/cla.vue'
import Index from '@/views/home/index.vue'
import Home from '@/views/home/home.vue'
import ss from '@/views/ss/index.vue'
import goods from '@/views/goods/index.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    { path: '/', redirect: '/home/index' },
    {path: '/goods/query',name: 'goods',component: goods,},
    {
      path: '/home',
      component: Home, children: [
        {
          path: 'index',
          component: Index,
        },
        {
          path: 'cla',
          component: Cla,
        },
        {
          path: 'asx',
          component: Asx,
        },
        {
          path: 'cart',
          component: Cart,
        },
        {
          path: 'my',
          component: My,
        },
      ]
    },
    {
      path: '/ss',
      name: 'ss',
      component: ss,
    },
  ],
})
export default router
